﻿<Window x:Class="EDMDesigner.Designer.Controls.CSDLType.AddPropertyWindows.AddScalarPropertyWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:localControlsCSDLTypeAddPropertyWindows="clr-namespace:EDMDesigner.Designer.Controls.CSDLType.AddPropertyWindows"
    Title="{x:Static localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow.WindowTitle}" 
    Width="250" 
    Height="140" 
    ResizeMode="NoResize"   
    WindowStartupLocation="CenterOwner"
    Loaded="Window_Loaded">
    
    <Grid Margin="5,0,5,5">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" VerticalAlignment="Center">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="35" />
                    <RowDefinition Height="35" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Column="0" Grid.Row="0" Text="{x:Static localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow.PropertyNameTextBlockText}" Margin="0,10,5,5" />
                <TextBox x:Name="nameTextBox" Grid.Column="1" Grid.Row="0" Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow}}, Path=PropertyName, UpdateSourceTrigger=PropertyChanged}" Height="25" TabIndex="0" />
                <TextBlock Grid.Column="0" Grid.Row="1" Text="{x:Static localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow.ScalarTypeTextBlockText}" Margin="0,10,5,5" />
                <ComboBox x:Name="typeComboBox" Grid.Column="1" Grid.Row="1" IsEditable="True" SelectedItem="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow}}, Path=PropertyType, UpdateSourceTrigger=PropertyChanged}" Height="25" TabIndex="1" />
            </Grid>
        </Grid>
        <StackPanel Grid.Row="1" Margin="0,0,0,5" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button Width="80" Height="25" Margin="0,0,5,0" Content="{x:Static localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow.CancelButtonText}" IsCancel="True" Click="CancelButton_Click" TabIndex="2" />
            <Button Width="80" Height="25" Content="{x:Static localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow.OkButtonText}" IsDefault="True" Click="OkButton_Click" TabIndex="3" IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddScalarPropertyWindow}}, Path=AllowOk}" />
        </StackPanel>
    </Grid>
</Window>
